// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   CategoryDao.java

package com.itheima.travel.dao;

import com.itheima.travel.model.Category;
import com.itheima.travel.util.JdbcUtils;
import java.sql.SQLException;
import java.util.List;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;

public class CategoryDao
{

	private JdbcTemplate jdbcTemplate;

	public CategoryDao()
	{
		jdbcTemplate = new JdbcTemplate(JdbcUtils.getDataSource());
	}

	public List findAllCategory()
		throws SQLException
	{
		String sql = "select * from tab_category order by cid";
		return jdbcTemplate.query(sql, new BeanPropertyRowMapper(com/itheima/travel/model/Category));
	}
}
